package com.wf.smartcomm.server.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

/** 
 * @author 38884306@qq.com  
 * @version 创建时间：2015-5-19 下午6:06:03 
 * 
 */
@Entity
@Table(name = "t_message")
public class Message {
//消息分类，强制消息必须接收
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Column(length = 1)
	private String type;
	
	@ManyToOne
	@JoinColumn(name = "uid")
	private User user;
	
	@Column(length = 32)
	private String toId;
	
	@Expose
	@Column
	private Integer status;
	
	@ManyToOne
	@JoinColumn(name = "vid")
	private Village village;
	
	@Expose
	@Column(length = 3200)
	private String content;
	
	@Expose
	@Column(length = 20)
	private String createdAt;

	public Village getVillage() {
		return village;
	}

	public void setVillage(Village village) {
		this.village = village;
	}

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	public String getToId() {
		return toId;
	}

	public void setToId(String toId) {
		this.toId = toId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
}
